package com.baway.empty

import android.content.Context
import android.graphics.Canvas
import android.view.MotionEvent
import android.view.ViewGroup

/**
 * Author: Jason Zhang
 * Date: 2025/9/4
 * Desc:
 */
class TempViewGroup(content: Context): ViewGroup(content) {

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)
    }

    override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
        TODO("Not yet implemented")
    }

    override fun onDraw(canvas: Canvas?) {
        super.onDraw(canvas)
    }


    override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
        //添加拦截条件判断

        //内部请求外部是否拦截
        requestDisallowInterceptTouchEvent(true)

        return false
    }

    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
        return super.onInterceptTouchEvent(ev)
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        return super.onTouchEvent(event)
    }


}